import request from '@/utils/request'

// 查询销售明细列表
export function listDetails(query) {
  return request({
    url: '/dr/sellDetails/list',
    method: 'get',
    params: query
  })
}


// 查询销售分析列表
export function sellAnalysis(query) {
  return request({
    url: '/dr/sellDetails/selectDrSellAnalysisList?pageNum=' + query.pageNum + "&pageSize=" + query.pageSize,
    method: 'post',
    data: query
  })
}

// 查询销售明细详细
export function getDetails(orderId) {
  return request({
    url: '/dr/sellDetails/' + orderId,
    method: 'get'
  })
}

// 新增销售明细
export function addDetails(data) {
  return request({
    url: '/dr/sellDetails',
    method: 'post',
    data: data
  })
}

// 修改销售明细
export function updateDetails(data) {
  return request({
    url: '/dr/sellDetails',
    method: 'put',
    data: data
  })
}

// 删除销售明细
export function delDetails(orderId) {
  return request({
    url: '/dr/sellDetails/' + orderId,
    method: 'delete'
  })
}



// 查询补样信息列表
export function selectCountByAwemeProductOwner(query) {
  return request({
    url: '/dr/sellDetails/select/count/aweme/product',
    method: 'post',
    params: query
  })
}
